package edu.kjxy.worker0312;

import java.util.Scanner;

public class worker15 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int num = in.nextInt();
		int reverse = 0;
		while(num > 0) {
			int bit = num % 10;
			reverse = reverse * 10 + bit;
			num /= 10;
		}
		System.out.println(reverse);
		in.close();
	}
}
